using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication11.Models.Mapping
{
    public class alert_ruleMap : EntityTypeConfiguration<alert_rule>
    {
        public alert_ruleMap()
        {
            // Primary Key
            this.HasKey(t => t.alert_rule_id);

            // Properties
            this.Property(t => t.alert_subject)
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("alert_rule");
            this.Property(t => t.alert_rule_id).HasColumnName("alert_rule_id");
            this.Property(t => t.alert_subject).HasColumnName("alert_subject");
            this.Property(t => t.alert_content).HasColumnName("alert_content");
            this.Property(t => t.total_num).HasColumnName("total_num");
            this.Property(t => t.effective_date).HasColumnName("effective_date");
            this.Property(t => t.status).HasColumnName("status");
            this.Property(t => t.service_seq).HasColumnName("service_seq");
        }
    }
}
